package com.foxit.adapp;
public class GroupUnit {   
     private String name;
     private String dimension;
     private String H;
     private String M;
     private String L;

     public GroupUnit() {
     }
     public GroupUnit(String gs) {
           if(gs!=null && gs.length()!=0) {
              String[] g=gs.split(",");
              if(g.length==5) {
                 this.name = g[0];
                 this.dimension = g[1];
                 this.H=g[2];
                 this.M=g[3];
                 this.L=g[4];
              }
           }
     }
     public GroupUnit(String name, String dimension,String H, String M, String L) {
           this.name =name;
           this.dimension = dimension;
           this.H = H;
           this.M = M;
           this.L = L;
     }
     public String getAD(int v) { 
           switch(v) {
               case 3: return H;
               case 2: return M;
               case 1:
               default: return L;
           }
     }
     public String getName() {
           return name;
     }
     public String getDimension() {
           return dimension;
     }
     public String getH() {
           return H;
     }
     public String getM() {
           return M;
     }
     public String getL() {
          return L;
     }
}
